<?php

namespace App\Http\Requests\admin;

use App\Http\Requests\Request;

class ArticleRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title' => 'required',
            'des' => 'required',
            'pic' => 'required',
            'con' => 'required',
        ];
    }

     public function messages(){
        return [
            'title.required'=>'文章标题不能为空',
            'des.required'=>'文章描述不能为空', 
            'pic.required'=>'主图不能为空',
            'con.required'=>'文章详情不能为空',

        ];
    }
}
